#ifndef CDIR_HELPER_H
#define CDIR_HELPER_H
#include "common/commonDefFun.h"

#include <algorithm>
#include <string>
#include <vector>

namespace libcvos_vfr
{
	namespace Helper
	{

		bool Tool_split_path(std::vector<std::string> & components, std::size_t & special, std::string const & path);

		bool Tool_checkFileOrDirExsit(const char* dirName);

		long Tool_make_directory(const char* dir);

		void Tool_make_dirs(const char* file_path);

		long Tool_getFile_size(const char* filename);

		bool Tool_loadFile(const char *fileName, void *pBuffer, unsigned int *inputOutputFileSize);

		bool Tool_save_file(const char* fileName, void* pData, unsigned int  dataSize);

		bool Tool_get_dll_path(char* buf, unsigned int* bufLen);

		bool Tool_get_current_dir(char* buf, unsigned int* bufLen);

#ifdef _WIN32
        void Tool_set_dll_path(const char* path);
		bool Tool_getFileVersionInfo(const char* szVersionFile, char* szVersionInfo, unsigned int  iVersionInfoLen);

		void Tool_set_dll_versionInfo(const char* info);
		bool Tool_get_dll_versionInfo(char* info, unsigned int* bufLen);
#else
        int Tool_copyfile_linux(const char* destination, const char* source);
#endif // WIN32

        int Tool_copyfile_crossPlatform(const char* destination, const char* source);

		//Convert relative paths to absolute paths
		bool Tool_get_real_path(const char* relativePath, char* absolutePaths, unsigned int* bufLen);
		
	}
}

#endif // !cdir_helper_h
